home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / ucblogo / README next >
Encoding:
Text File  |  1995-07-14  |  7.6 KB  |  160 lines

  1. BERKELEY LOGO INTERPRETER   Installation guide for Unix systems
  2.  
  3.  *    Copyright (C) 1993 by the Regents of the University of California
  4.  *
  5.  *      This program is free software; you can redistribute it and/or modify
  6.  *      it under the terms of the GNU General Public License as published by
  7.  *      the Free Software Foundation; either version 2 of the License, or
  8.  *      (at your option) any later version.
  9.  *  
  10.  *      This program is distributed in the hope that it will be useful,
  11.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *      GNU General Public License for more details.
  14.  *  
  15.  *      You should have received a copy of the GNU General Public License
  16.  *      along with this program; if not, write to the Free Software
  17.  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. This version of Logo is designed for a machine with adequate memory.  It is
  20. not likely to be usable as the basis for a 64K microcomputer implementation.
  21.  
  22. The interpreter was written primarily by Daniel Van Blerkom, Brian Harvey,
  23. Michael Katz, and Douglas Orleans.  Thanks to Fred Gilham for the X11 code.
  24. Send comments by e-mail to bh@cs.berkeley.edu.
  25.  
  26.  
  27. In addition to this README file you need the following source files:
  28.  
  29.         graphics.c    logo.h        makelib        parse.c
  30. coms.c        ibmterm.c    logodata.c    math.c        print.c
  31. error.c        ibmterm.h    macterm.c    mem.c        term.c
  32. eval.c        init.c        macterm.h    nographics.c    wrksp.c
  33. files.c        intern.c    main.c        nographics.h    xgraphics.c
  34. globals.h    lists.c        makefile    paren.c        xgraphics.h
  35.  
  36. Edit the makefile to adjust its idea of where the X11 library and
  37. header files live.
  38.  
  39. With these files in place you should be able to say "make" and get two
  40. results: an executable file named "logo" and a subdirectory named "logolib"
  41. containing some pseudo-primitive procedures written in Logo.  (Some of these
  42. may be real primitives in later releases.)  If you would like to move the
  43. Logo library to somewhere other than the source directory, you must edit
  44. the file libloc.c (which was generated by make) and recompile.  The easiest
  45. thing is if you just leave logolib where it is.
  46.  
  47. The distribution also includes the file "usermanual" which is a rather terse
  48. description of this particular Logo dialect for people who already know how
  49. to program in Logo.
  50.  
  51. To install Logo you need merely move the file "logo" to wherever you want it.
  52.  
  53. The files ztc* and mac* are for toy-computer versions of Logo.  But if you
  54. are trying to compile for those machines you probably also need some extra
  55. help beyond what's in here.  You can get complete PC and Mac versions by
  56. anonymous FTP from anarres.cs.berkeley.edu.
  57.  
  58. ----------
  59.  
  60. Here are the special features of this dialect of Logo:
  61.  
  62.     Random-access arrays.
  63.  
  64.     Variable number of inputs to user-defined procedures.
  65.  
  66.     Mutators for list structure (dangerous).
  67.  
  68.     Pause on error, and other improvements to error handling.
  69.  
  70.     Comments and continuation lines; formatting is preserved when
  71.     procedure definitions are saved or edited.
  72.  
  73.     Terrapin-style tokenization (e.g., [2+3] is a list with one member)
  74.     but LCSI-style syntax (no special forms except TO).  The best of
  75.     both worlds.
  76.  
  77.     First-class instruction and expression templates.
  78.  
  79.     Macros.
  80.  
  81. ----------
  82.  
  83. This program was developed on a VAX running 4.3BSD Unix.  Certain VAX
  84. hardware misfeatures are handled in code that's compiled #ifdef vax.
  85. Certain 4.3BSD features are used in code that's compiled #ifdef bsd.  The
  86. variable bsd is set by #define in the file logo.h if either vax or sun is
  87. defined.  If you are running on a 4.3 system not on a VAX or a Sun you might
  88. wish to edit logo.h accordingly.  (Alternatively, you might want to define
  89. the symbol sysv in logo.h if you're running on one of those.)  Here are all
  90. the known system dependencies:
  91.  
  92. The constant WORDSIZE is defined to be 32 in logo.h and should be changed
  93. if the number of bits in an int is different on your machine.
  94.  
  95. The file math.c contains VAX-specific code to enable integer overflow
  96. interrupts; if an integer overflow occurs the operands are converted to
  97. floating point and the operation is recomputed.  If you are not running on a
  98. VAX but your machine requires some specific action to enable integer
  99. overflow signalling, you may wish to install something similar.  Just look
  100. for the "#ifdef vax" lines.
  101.  
  102. On the other hand, most machines these days don't provide integer overflow
  103. interrupts no matter what.  Therefore, the default is that Logo tries to
  104. figure out for itself whether or not an integer arithmetic operation would
  105. lead to overflow.  For addition and subtraction, Logo plays with the signs
  106. of the various quantities; for multiplication and INT, it just does the
  107. operation in floating point to begin with, and converts back to integer if
  108. possible.  Logo's idea of "if possible" depends on the value of MAXINT in
  109. logo.h, which is 2^31-1 as distributed.
  110.  
  111. Also, the VAX Unix math library invokes a procedure infnan() in case of
  112. illegal operands to a math function.  The library version of this procedure
  113. causes an abort; math.c in Logo provides an alternative, for the VAX only,
  114. that treats the problem like floating point overflow.
  115.  
  116. The Sun Unix math library invokes a procedure matherr() in case of math
  117. function problems.  Logo provides, #ifdef sun, a version that silently turns
  118. underflow into zero and gives a Logo-style error message, instead of the
  119. system default C-style message and a funny answer, for everything else.
  120.  
  121. Different versions of Unix may differ in the completeness of their math
  122. libraries.  Logo uses sin(), cos(), atan(), atan2(), sqrt(), exp(), log10(),
  123. log(), pow(), drem(), ceil(), and floor().  If you are missing any of those
  124. you will have to provide your own or turn off the corresponding Logo
  125. primitive.  (Drem is used by the sin and cos primitives to reduce large
  126. angle inputs to the range in which they can be converted accurately to
  127. radians.  Ceil and floor are used by the int and round primitives when the
  128. output is too large to fit in integer representation.)
  129.  
  130. The RANDOM and RERANDOM primitives use the 4.3BSD random() and srandom()
  131. if bsd is defined, rather than the older rand() and srand().  The relevant
  132. code is in math.c and init.c with #ifdef bsd.
  133.  
  134. The WAIT primitive uses the microsecond-resolution usleep() rather than the
  135. second-resolution sleep() in coms.c if bsd is defined.
  136.  
  137. If your <sgtty.h> does not define FIONREAD, the ioctl that returns the number
  138. of characters currently available from the keyboard, then the KEYP primitive
  139. won't work.  The code in files.c prints a warning and returns TRUE in that
  140. case.  (The idea is that hanging is a better fate than looping for your
  141. Logo procedure.)
  142.  
  143. If your <sgtty.h> defines TIOCSTI, then it is used to simulate the user typing
  144. a newline when she types the system interrupt or quit character while Logo is
  145. waiting for keyboard input.  This gets Logo out of the pending read and allows
  146. it to print a prompt.  If TIOCSTI is not defined, then Logo uses a kludge with
  147. setjmp and longjmp instead.  The relevant code is in main.c, eval.c, files.c,
  148. and parse.c.
  149.  
  150. If SYSV is defined, then term.c uses System V terminal control instead of
  151. BSD-style terminal control.
  152.  
  153. European countries use an ISO extension of ASCII in which certain characters
  154. have the 0200 (parity) bit set.  Logo ordinarily uses this bit to indicate
  155. that the character was backslashed.  #ifdef ecma (set in logo.h) Logo uses
  156. a more complicated encoding in which only characters with special syntactic
  157. meaning are eligible for backslashing, and are represented by codes in the
  158. range 0200-0237.  Characters above 0237 are considered ordinary letters.
  159. This is conditionally compiled because it slows things down a little.
  160.